package com.un.ebs.workflow.domain;

import com.un.ebs.workflow.enums.GatewayTypeEnum;

import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (WorkflowNodeGateway)表实体类
 *
 * @author liubo
 * @since 2020-08-24 17:03:25
 */
@Data
@Component
@TableName("tb_workflow_node_gateway")
@SuppressWarnings("serial")
public class WorkflowNodeGateway extends Model<WorkflowNodeGateway> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "prev_node_id", length = 40, precision = 0)
    private String prevNodeId;

    @DbField(name = "next_node_id", length = 40, precision = 0)
    private String nextNodeId;

    @DbField(name = "expression", length = 255, precision = 0)
    private String expression;

    @DbField(name = "gateway_type", length = -1, precision = 0)
    private GatewayTypeEnum gatewayType;

    @DbField(name = "workflow_id", length = 40, precision = 0)
    private String workflowId;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}